export interface LessonState {
  schCourseChapterId?: number;
  name?: string;
  type?: number;
  introduce?: string;
  parentId?: number;
  content?: string;
  refFileList?:
    | [
        {
          fileKey?: string;
          fileName?: string;
          size?: number;
          type?: string;
        }
      ]
    | [];
  dependsOnList?:
    | [
        {
          refBizType?: number;
          refBizId?: number;
        }
      ]
    | [];
  applyToList?:
    | [
        {
          refBizType?: number;
          refBizId?: number;
        }
      ]
    | [];
  refPageList?:
    | [
        {
          refBizType?: number;
          refBizId?: number;
        }
      ]
    | [];
}

const initialState: LessonState = {
  schCourseChapterId: 0,
  name: '',
  type: 0,
  introduce: '',
  parentId: 0,
  content: '',
  refFileList: [
    {
      fileKey: '',
      fileName: '',
      size: 0,
      type: '',
    },
  ],
  dependsOnList: [
    {
      refBizType: 0,
      refBizId: 0,
    },
  ],
  applyToList: [
    {
      refBizType: 0,
      refBizId: 0,
    },
  ],
  refPageList: [
    {
      refBizType: 0,
      refBizId: 0,
    },
  ],
};

export default function lesson(state = initialState, action) {
  switch (action.type) {
    default:
      return state;
  }
}
